package GUI.ManagerEmployee;

import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextField;

import Controllers.ManagerEmpCotntroler;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class NewSalePnl extends JPanel {
	public JTextField nameTextField;
	public JTextField sDateTextField;
	public JTextField eDateTextField;
	public JButton btnAddSale;
	private JTextField textFieldProduct;
	
	/**
	 * Create the panel.
	 */
	public NewSalePnl() {
		setLayout(null);
		
		//btnAddSale = new JButton("Add Sale");
		/*btnAddSale.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				
			}
		});*/
		btnAddSale = new JButton("Add Sale");
		btnAddSale.setBounds(93, 221, 84, 29);
		add(btnAddSale);
		
		JLabel lblNewLabel = new JLabel("Name:");
		lblNewLabel.setBounds(22, 24, 46, 14);
		add(lblNewLabel);
		
		nameTextField = new JTextField();
		nameTextField.setBounds(102, 21, 99, 20);
		add(nameTextField);
		nameTextField.setColumns(10);
		
		JLabel label = new JLabel("");
		label.setBounds(22, 63, 46, 14);
		add(label);
		
		JLabel lblNewLabel_1 = new JLabel("Start Date:");
		lblNewLabel_1.setBounds(22, 63, 62, 14);
		add(lblNewLabel_1);
		
		sDateTextField = new JTextField();
		sDateTextField.setBounds(102, 57, 99, 20);
		add(sDateTextField);
		sDateTextField.setColumns(10);
		
		JLabel lblEndDate = new JLabel("End Date:");
		lblEndDate.setBounds(22, 105, 62, 14);
		add(lblEndDate);
		
		eDateTextField = new JTextField();
		eDateTextField.setColumns(10);
		eDateTextField.setBounds(102, 102, 99, 20);
		add(eDateTextField);
		
		JLabel lblIncludedProducts = new JLabel("Products:");
		lblIncludedProducts.setBounds(22, 148, 46, 14);
		add(lblIncludedProducts);
		
		textFieldProduct = new JTextField();
		textFieldProduct.setColumns(10);
		textFieldProduct.setBounds(102, 145, 99, 20);
		add(textFieldProduct);
	}
	
	public void addController(ActionListener controller){
		System.out.print("new sale pnl->Add controller");
		btnAddSale.addActionListener(controller);
	}
}
